#include "qresourcewidget.h"

#include "qresourcefolderwidget.h"
#include "qimagewidget.h"

#include "../../libs/coreLib/minisplitter.h"

#include <QVBoxLayout>

QResourceWidget::QResourceWidget(QWidget *parent) :
    CORELIB::QAbstractPageWidget(parent),
    m_folderWidget(new QResourceFolderWidget),
    m_imageWidget(new QImageWidget)
{
    CORELIB::MiniSplitter *splitter=new CORELIB::MiniSplitter(Qt::Horizontal);
    m_folderWidget->resize(200,200);
    splitter->addWidget(m_folderWidget);
    splitter->addWidget(m_imageWidget);

    splitter->setStretchFactor(0,0);
    splitter->setStretchFactor(1,1);

    QVBoxLayout *v=new QVBoxLayout;
    v->setMargin(0);
    v->setSpacing(0);
    v->addWidget(splitter);
    this->setLayout(v);

    connect(m_folderWidget,SIGNAL(select(QString,QString)),m_imageWidget,SLOT(setImage(QString,QString)));
}
